package cn.sofwin.day0118.homework.LOL;

public class Monster {
    int level;
    int hp;

    public Monster() {
        this.level = 1;
        this.hp = 1000;
    }

    public void showInfo(){
        System.out.println("怪物属性：");
        System.out.println("等级：" + level + "\t血量：" + (level*1000));
    }
    public void upLevel(){// 每重生一次，等级+1，血量变为等级的1000倍
        level++;
        hp = level * 1000;
    }
}
